actual vector3 object unity

82

actual vector3 object unity -

//A gameObject's Vector3 is its transform.position. So if you have a reference to it you can just use:
Vector3 lastPosition = gameObject.transform.position;


//Or if the save script is on the gameObject its self, you can just reference the transform directly:
Vector3 lastPosition = transform.position;

//More info in the Unity Docs.

Comments

Submit
0 Comments